Return to doc.sitecore.com

Valid for Sitecore 5.3
Why when I use a picture from the media-library as a background it renders perfectly in IE but does not show at all in Firefox?

Q:

Why when I use an image from the Media Library as a background like this:

<div class="sdupageteaserleft" style="background-image: url({sc:fld('image',$item,'src')})">

it renders perfectly in IE but does not show at all in Firefox?

The rendered code looks like this:

<div class="sdupageteaserleft" style="background-image: url(~/media/Images/Generel/top_tekstbaggr/top_back_1_left gif.ashx?db=master&20070115T1200178032)">

A:

Firefox does not like the space; that should be converted to a %20. Nested quotes around the image path may also help.

XslHelper should include a Replace function (missing from XSL 1.1) in Sitecore 5.3.1.